package com.global.vo;

import java.io.Serializable;

/**
 * 存储每个栏位的值信息
 * @author zly601436
 *
 */
public class CellValueProperties implements Serializable {

	private static final long serialVersionUID = 425496017193648824L;
	
	String key;
	String value;
	String message;
	
	public CellValueProperties() {
		key = "";
		value = "";
		message = "";
	}

	public CellValueProperties(String key, String value, String message) {
		this.key = key;
		this.value = value;
		this.message = message;
	}
	
	/**
	 * 获取栏位名称
	 * @return
	 */
	public String getKey() {
		return key;
	}
	/**
	 * 设置栏位名称
	 * @param key
	 */
	public void setKey(String key) {
		this.key = key;
	}

	/**
	 * 获取栏位对应的值
	 * @return
	 */
	public String getValue() {
		return value;
	}
	/**
	 * 设置栏位对应的值
	 * @param key
	 */
	public void setValue(String value) {
		this.value = value;
	}

	/**
	 * 获取在给栏位设置值时，出现的异常信息
	 * @return
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * 获取在给栏位设置值时，记录出现的异常信息
	 * @param message
	 */
	public void setMessage(String message) {
		this.message = message;
	}
	
	
	@Override
	public String toString() {
		return "CellValueProperties [key=" + key + ", value=" + value
				+ ", message=" + message + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((key == null) ? 0 : key.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		CellValueProperties other = (CellValueProperties) obj;
		if (key == null) {
			if (other.key != null)
				return false;
		} else if (!key.equals(other.key))
			return false;
		return true;
	}
}